package giftmail.util;

public enum SGErrorCode {
	
	NULL_OBJ("O001","对象为空"),
	ERROR_ADD_USER("O002","添加用户失败"),
	LOGIN_VERIFY_FAILURE("O003","登录验证失败，请检查用户名密码是否正确"),
	NULL_NAMEORPASSWORD("004","用户名或者密码为空"),
	UNKNOWN_ERROR("9999","系统繁忙，请稍后再试...."),
	RES_PARAMS_ERROR("-1","操作失败"),
	RES_OK("0","操作成功");
	
    private String value;
    private String desc;

    private SGErrorCode(String value, String desc) {
        this.setValue(value);
        this.setDesc(desc);
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
    
    @Override
    public String toString() {
    	return "[" + this.value + "]" + this.desc;
    }
}
